<?php
include_once('beans/interventionBean.php');
include("verif_session.php");
include("bdd_connection.php");
include_once('config.php');
include_once('ConnectBD.php');

class interventionDao{
	public $listeInterv=array();

public function loadAllIntervention(){
     $req=connexion()->prepare("select * from intervention i,tache t where i.idTache=t.idTache");
     $req->execute();

     while($row = $req->fetch(PDO::FETCH_OBJ)) {
       $interv=new interventionBean();
       $interv->setIdNomade($row->idNomade);
       $interv->setIdTache($row->idTache);
       $interv->setObjectif($row->objectif);
       $interv->setDesignation($row->designation);
       $interv->setDateDebut($row->dateDebut);
       $interv->setIdNomadeCible($row->idNomadeCible);
       $interv->setEtat($row->etat);
       $listeInterv[]=$interv;
         }
       return $listeInterv;

   }
}
